// 下拉列表
$('#sel-btn').hover(function(){
    $('.relect_list').css('display','block')
})
$('.relect_list').hover(function(){},function(){
    $('.relect_list').css('display','none')
})
// 登录按钮
$('#login').on('click',function(){
    window.location.href= '/html/login.html'
})
$('.ss').on('click',function(){
    $('.nav-right').replaceWith('<input type="text" style="width: 150px; height: 30px; margin-top: 20px; border-radius: 30px; padding-left:20px;" id="sousuo">')
})
$('.kf').on('click',function(){
    window.location.href='/html/kf.html'
})
$('#hw-mall').on('click',function(){
    window.location.href='/html/shopping.html'
})
$('#phone-mall').on('click',function(){
    window.location.href='/html/shopping-mall.html'
})
$('#HmOS').on('click',function(){
    window.location.href='/html/HarmonyOS.html'
})
$(function () {
    //窗口滚动时间
    $(window).scroll(function () {
        //获取当前窗口与页面顶端距离
        let top = $(this).scrollTop();
        if(top>=300){
            //显示回到顶部的小火箭
            $('.get-up').slideDown(1000);
        }else{
            $('.get-up').fadeOut();
        }
    })
    //点击火箭回到顶部
    $('.get-up').click(function () {
        $('html,body').animate({
            scrollTop:0
        },'slow');
})
})